<%@ page language="java" pageEncoding="UTF-8"%>
<%@include file="/views/common/include/taglib.jsp"%>
	<script
		src="${ctx}/js/controllers/news/noticeinfo/NoticeInfoListController.js"
		type="text/javascript">
	</script>
	<div style="top:130px;position:fixed;height:30px;font-size: 14px; font-family: '微软雅黑';margin-left:-236px;">
		当前位置：${sessionScope.currcent_position}
	</div>
	<input type="hidden" value="${unRead}" id="hasReadOrNot" />
	<c:if test="${unRead > 0}">
	<div class="unRead">
		${unRead}
	</div>
	</c:if>
	<style>
		.userType{
			float:right;
			margin-right:10px;
			margin-top: 10px;
			line-height: 22px;
			text-align: center;
			width: 50px;
			height: 22px;
			font-size:14px;
			border:1px solid ;
		}
		.unRead{
			float:left;
			position: fixed;
			margin-left: -103px;
			margin-top: 81px;
			background-color:#FF8C05;
			color:#FFFFFF;
			width:22px;
			height:22px;
			border-radius:50%;
			text-align:center;
			font-size: 14px; 
			font-family: '微软雅黑';
			line-height:22px;
		}
	</style>
<section>
	<div style="margin-top:26px;font-family: '微软雅黑';">
		<div style="height:40px;">
			<div style="float:left;width:165px; height:40px; background-color:#709DCA; font-size: 18px; color: #FAFCFD; text-align:center;line-height: 40px;">
				<img id="title" src="${ctx }/images/seller/news/trumpet.png" ><span style="margin-left:16px">小区通知</span>
			</div>
			<img id="title" src="${ctx }/images/seller/news/triangle.png" style="margin-top:29px">
		</div>
		<div style="border:1px solid #C5CFDF">
			<div style="padding:15px;" >
				<c:forEach items="${noticeInfo.list }" var="noticeInfo" varStatus="noticeInfoStatus">
					<li>
						<!-- 未读 -->
						<c:if test="${noticeInfo.resultCount == 0}">
							<div style="margin-left: 15px;height:60px;line-height: 60px; cursor:pointer" onclick="showDetail(${noticeInfo.id})">
				                <div style="float:left;"> 
					                <!-- D生活（平台和运营） -->
									<c:if test="${noticeInfo.userType == 0 or noticeInfo.userType == 1}">
										<img style="float:left;margin-top: 5px;" src="${ctx}/images/seller/news/noticeInfo/userType_Dlife.png">
									</c:if>
									<!-- 物业（物业） -->
									<c:if test="${noticeInfo.userType == 2}">
										<img style="float:left;margin-top: 5px;width:33px;height:34px;" src="${ctx}/images/seller/news/noticeInfo/userType_property.png">
									</c:if>
									<!-- 通知logo -->
		                        	<c:if test="${not empty noticeInfo.logo}">
		                       	 		<div style="height: 43px;width: 43px;float: left;">
		                       	 			<img style="width: 100%;height: 100%;border-radius: 50%;" src="${sessionScope.image_logo}${noticeInfo.logo}"/>
		                        		</div>
		                       	 	</c:if>
		                       	 	<!-- 默认通知logo -->
		                        	<c:if test="${empty noticeInfo.logo}">
		                        		<div style="height: 43px;width: 43px;float: left;">
		                       	 			<img src="${ctx}/images/seller/news/noticeInfo/default.png"/>
		                       	 		</div>
		                       	 	</c:if>
		                       	 	<c:choose>
										<c:when test="${fn:length(noticeInfo.title) > 15}">
											<span id="title${noticeInfo.id}"
												onmouseover="mouseOverTitle(${noticeInfo.id} , '${noticeInfo.title}')"
												onmouseout="mouseOutTitle(${noticeInfo.id} , '${noticeInfo.title}')">&nbsp;&nbsp;${fn:substring(noticeInfo.title , 0 , 15)}...</span>
										</c:when>
										<c:otherwise>
											<span id="title${noticeInfo.id}">&nbsp;&nbsp;${noticeInfo.title}</span>
										</c:otherwise>
									</c:choose>
								</div>
								<div style="float: right;">
				                    <span style="margin-right: 35px;"><fmt:formatDate value="${noticeInfo.updateTime}" pattern="yyyy/MM/dd"/> 
										<span style="margin-left: 25px;"><fmt:formatDate value="${noticeInfo.updateTime}" pattern="HH:mm"/></span>
									</span>
									<img style="margin-right: 15px;" src="${ctx}/images/seller/news/noticeInfo/read_not.png">
									<!-- 水电 -->
									<c:if test="${noticeInfo.type == 2}">
										<img style="margin-right: 15px;" src="${ctx}/images/seller/news/noticeInfo/type_waterElect.png">
									</c:if>
									<!-- 安全 -->
									<c:if test="${noticeInfo.type == 1}">
										<img style="margin-right: 15px;" src="${ctx}/images/seller/news/noticeInfo/type_save.png">
									</c:if>
								</div>
							</div>
						</c:if>
						<!-- 已读 -->
						<c:if test="${noticeInfo.resultCount != 0}">
							<div style="margin-left: 15px;height:60px;line-height: 60px; cursor:pointer" onclick="showDetail(${noticeInfo.id})">
				                <div style="float:left;"> 
					                <!-- D生活（平台和运营） -->
									<c:if test="${noticeInfo.userType == 0 or noticeInfo.userType == 1}">
										<img style="float:left;margin-top: 5px;" src="${ctx}/images/seller/news/noticeInfo/userType_Dlife.png">
									</c:if>
									<!-- 物业（物业） -->
									<c:if test="${noticeInfo.userType == 2}">
										<img style="float:left;margin-top: 5px;width:33px;height:34px;" src="${ctx}/images/seller/news/noticeInfo/userType_property.png">
									</c:if>
									<!-- 通知logo -->
		                        	<c:if test="${not empty noticeInfo.logo}">
		                       	 		<div style="height: 43px;width: 43px;float: left;">
		                       	 			<img style="width: 100%;height: 100%;border-radius: 50%;" src="${sessionScope.image_logo}${noticeInfo.logo}"/>
		                        		</div>
		                       	 	</c:if>
		                       	 	<!-- 默认通知logo -->
		                        	<c:if test="${empty noticeInfo.logo}">
		                        		<div style="height: 43px;width: 43px;float: left;">
		                       	 			<img src="${ctx}/images/seller/news/noticeInfo/default.png"/>
		                       	 		</div>
		                       	 	</c:if>
									<c:choose>
										<c:when test="${fn:length(noticeInfo.title) > 15}">
											<span style="color: #B5B1B2;" id="title${noticeInfo.id}"
												onmouseover="mouseOverTitle(${noticeInfo.id} , '${noticeInfo.title}')"
												onmouseout="mouseOutTitle(${noticeInfo.id} , '${noticeInfo.title}')">&nbsp;&nbsp;${fn:substring(noticeInfo.title , 0 , 15)}...</span>
										</c:when>
										<c:otherwise>
											<span style="color: #B5B1B2;" id="title${noticeInfo.id}">&nbsp;&nbsp;${noticeInfo.title}</span>
										</c:otherwise>
									</c:choose>
								</div>
								<div style="float: right;">
									<span style="margin-right: 35px;color: #B5B1B2;"><fmt:formatDate value="${noticeInfo.updateTime}" pattern="yyyy/MM/dd"/> 
										<span style="margin-left: 25px;"><fmt:formatDate value="${noticeInfo.updateTime}" pattern="HH:mm"/></span>
									</span>
									<img style="margin-right: 15px;" src="${ctx}/images/seller/news/noticeInfo/read_has.png"></a>
									<!-- 水电 -->
									<c:if test="${noticeInfo.type == 2}">
										<img style="margin-right: 15px;" src="${ctx}/images/seller/news/noticeInfo/type_waterElect.png">
									</c:if>
									<!-- 安全 -->
									<c:if test="${noticeInfo.type == 1}">
										<img style="margin-right: 15px;" src="${ctx}/images/seller/news/noticeInfo/type_save.png">
									</c:if>
								</div>
							</div>
						</c:if>
					</li>
					<hr style="border:1px solid #DFE7F4;margin-bottom: 0px;">
				</c:forEach>
			</div>
		</div>
			
		<div style="overflow: hidden;">
			<div style="float: right; margin-right: 10px; margin-top: 48px">
				<div style="float: left;">
					<ul class="footer_ul">
						<c:if test="${noticeInfo.hasPreviousPage }">
							<li onclick="gotoPage(${currentPage-1 });"><a
								style="color: #37CED4">&lt;&lt;</a></li>
						</c:if>
						<c:if test="${noticeInfo.firstPage > 1}">
							<li onclick="gotoPage(1);"
								style="border: 1px solid #9A9A9A;"><a>1</a></li>
							<c:if test="${noticeInfo.firstPage > 2}">
                       		...
                       	</c:if>
						</c:if>
						<c:forEach items="${noticeInfo.navigatepageNums }" var="page">
							<li onclick="gotoPage(${page });"
								class="<c:if test="${currentPage == page }">active</c:if>"
								style="border: 1px solid #9A9A9A;"><a>${page}</a></li>
						</c:forEach>
						<c:if test="${noticeInfo.lastPage < noticeInfo.pages}">
							<c:if test="${noticeInfo.firstPage < noticeInfo.pages - 1}">
                       		...
                       	</c:if>
							<li onclick="gotoPage(${noticeInfo.pages});"
								style="border: 1px solid #9A9A9A;"><a>${noticeInfo.pages}</a>
							</li>
						</c:if>
						<c:if test="${noticeInfo.hasNextPage }">
							<li><a onclick="gotoPage(${currentPage+1});"
								style="color: #37CED4">&gt;&gt;</a></li>
						</c:if>
					</ul>
				</div>
				<div style="float: left; height: 30px;">
					<span style="color: #9A9A9A;">跳转到</span> 
					<input class="inputclass" id="pageNo" onkeydown="if(event.keyCode==13){event.keyCode=0;return false;}"
						type="text" value="${currentPage }" style="width: 26px; height: 28px" onkeyup = "checInputNum(this)"> 
					<span style="color: #9A9A9A;">页</span> 
					<span class="buttonclass" id="J_JumpTo" onclick="gotoNoticeInfoPage(null);"> <a>GO</a></span>
				</div>
			</div>
		</div>
	</div>
</section>

<script type="text/javascript">
	var ctx = '${ctx}';
	setCtx(ctx);
</script>

<!-- 解决ie 6 7 8 9不能显示placeholder的问题 -->
<script src="${ctx}/js/lib/jquery.JPlaceholder.js"></script>
